package net.vinote.smart.platform.service.dw.html;

/**
 * 富文本框,集成了KindEditor
 * 
 * @author 郑俊伟
 * 
 */
public class RichTextAreaTag extends TextAreaTag {

	public RichTextAreaTag(HtmlTag htmlTag) {
		super(htmlTag);
		addClass("ckeditor");
	}

	@Override
	public String getHtmlTemplate() {
		StringBuffer sb = new StringBuffer();
		/*sb.append("<script>");
		sb.append("    var editor;");
		sb.append("    KindEditor.ready(function(K) {");
		sb.append("    editor = K.create('textarea[name=\"#name\"]', {");
		sb.append("        allowFileManager : true,");
		sb.append("        width:'95%'");
		sb.append("    });");
		sb.append("});");
		sb.append("</script>");*/
		sb.append(super.getHtmlTemplate());
		return sb.toString();
	}

	@Override
	protected void initPlaceHolder() {
		super.initPlaceHolder();
		placeholder.put("#name", getName());
	}

}
